package xixirupan.tmgp.tencent.com.vmeim.ui.mine.view;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import xixirupan.tmgp.tencent.com.vmeim.R;
import xixirupan.tmgp.tencent.com.vmeim.ui.mine.presenter.MinePresenter;

/**
 * Created by lenovo on 2016/10/18.
 */

public class MineFragment extends Fragment {
    @BindView(R.id.back_mine)
    ImageView backMine;
    @BindView(R.id.message_mine)
    ImageView messageMine;
    @BindView(R.id.setting_mine)
    ImageView settingMine;
    @BindView(R.id.login_registor_mine)
    TextView loginRegistorMine;
    @BindView(R.id.imgview_prasie_mine)
    ImageView imgviewPrasieMine;
    @BindView(R.id.imageview_comment_mine)
    ImageView imageviewCommentMine;
    @BindView(R.id.prasie_maine)
    LinearLayout prasieMaine;
    @BindView(R.id.mine_orders)
    RelativeLayout mineOrders;
    @BindView(R.id.daifukuan)
    ImageView daifukuan;
    @BindView(R.id.daifahuo_mine)
    ImageView daifahuoMine;
    @BindView(R.id.daishouhuo_mine)
    ImageView daishouhuoMine;
    @BindView(R.id.daishuaidan_mine)
    ImageView daishuaidanMine;
    @BindView(R.id.shouhou_mine)
    ImageView shouhouMine;
    @BindView(R.id.mycount_list_mine)
    TextView mycountListMine;
    @BindView(R.id.cash_mine)
    TextView cashMine;
    @BindView(R.id.hope_list_mine)
    TextView hopeListMine;
    @BindView(R.id.gridView_mine)
    GridView gridViewMine;

    private Unbinder bind;
        private MinePresenter presenter;
    private Context context;
    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        this.context =context;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fagment_mine_layout, container, false);
         bind = ButterKnife.bind(this, view);
        presenter =new MinePresenter(gridViewMine,context,inflater);
        presenter.getData();

        return view;
    }

    @OnClick({R.id.back_mine, R.id.message_mine, R.id.setting_mine, R.id.login_registor_mine, R.id.imgview_prasie_mine, R.id.imageview_comment_mine, R.id.prasie_maine, R.id.mine_orders, R.id.daifukuan, R.id.daifahuo_mine, R.id.daishouhuo_mine, R.id.daishuaidan_mine, R.id.shouhou_mine, R.id.mycount_list_mine, R.id.cash_mine, R.id.hope_list_mine})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.back_mine:
                break;
            case R.id.message_mine:
                break;
            case R.id.setting_mine:
                break;
            case R.id.login_registor_mine:
                break;
            case R.id.imgview_prasie_mine:
                break;
            case R.id.imageview_comment_mine:
                break;
            case R.id.prasie_maine:
                break;
            case R.id.mine_orders:
                break;
            case R.id.daifukuan:
                break;
            case R.id.daifahuo_mine:
                break;
            case R.id.daishouhuo_mine:
                break;
            case R.id.daishuaidan_mine:
                break;
            case R.id.shouhou_mine:
                break;
            case R.id.mycount_list_mine:
                break;
            case R.id.cash_mine:
                break;
            case R.id.hope_list_mine:
                break;
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        bind.unbind();
    }
}
